import request from '@/utils/api'

export function listMenu (param) {
  return request({
    url: '/menu/list',
    method: 'get',
    params: param
  })
}

export function menuPage (param) {
  return request({
    url: '/menu/listTree',
    method: 'get',
    params: param
  })
}

export function addMenu (data) {
  return request({
    url: '/menu',
    method: 'put',
    data
  })
}

export function updateMenu (data) {
  return request({
    url: '/menu',
    method: 'post',
    data
  })
}

export function deleteMenu (data) {
  return request({
    url: '/menu',
    method: 'delete',
    data
  })
}
